package org.example.pattern.chain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.example.pattern.chain.model.ChainConfig;

/**
 * beyond u self and trust u self.
 *
 * @Author: lbc
 * @Date: 2023-05-12 10:51
 * @email: 594599620@qq.com
 * @Description: oh my god！ niu bi...
 */
@Getter
@AllArgsConstructor
public enum GatewayEnum {

    //  拦截者名称，全限定类名，handlerId, preHandlerId，nextHandlerId
    API_HANDLER(new ChainConfig("api接口限流", "org.example.pattern.chain.handler.ApiLimitGatewayHandler", 1, null, 2)),

    BLACKLIST_HANDLER(new ChainConfig("黑名单拦截", "org.example.pattern.chain.handler.BlacklistGatewayHandler", 2, 1, 3)),

    SESSION_HANDLER(new ChainConfig("用户会话拦截", "org.example.pattern.chain.handler.SessionGatewayHandler", 3, 2, 4)),

    PARAM_HANDLER(new ChainConfig("参数拦截", "org.example.pattern.chain.handler.ParamGatewayHandler", 4, 3, null));


    ChainConfig gatewayEntity;


}
